package com.example.experiments.util;

import android.content.Context;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;

//Doesn't work for some reason...
public class SoundPlayer {
	public static void playSound(Context context, int sound)
	{
		MediaPlayer mp = MediaPlayer.create(context, sound);
		mp.start();
		mp.setOnCompletionListener(new OnCompletionListener(){
			@Override
			public void onCompletion(MediaPlayer mp) {
				mp.stop();
				mp.release();
			}
		});
	}
}
